const mongoose = require('./db')
const ObjectId = mongoose.Schema.Types.ObjectId


const AllowanceSchema = new mongoose.Schema({
  name: { type: String, required: true, unique: true },
  desc: String, // 补助说明
  creator: { type: ObjectId, ref: 'Admin', required: true },
}, {
  collection: 'Allowance',
  timestamps: true,
})

const Allowance = mongoose.model('Allowance', AllowanceSchema)


module.exports = Allowance